SQL Antipatterns, Volume 1: Avoiding the Pitfalls of Database Programming

SQL Antipatterns, Volume 1: Avoiding the Pitfalls of Database Programming

  • Downloads:2603
  • Type:Epub+TxT+PDF+Mobi
  • Create Date:2022-11-17 16:16:34
  • Update Date:2025-09-24
  • Status:finish
  • Author:Bill Karwin
  • ISBN:1680508989
  • Environment:PC/Android/iPhone/iPad/Kindle

Summary

Each chapter in this book helps you identify, explain, and correct a unique and dangerous antipattern。 The four parts of the book group the anti​patterns in terms of logical database design, physical database design, queries, and application development。 The chances are good that your application's database layer already contains problems such as Index Shotgun, Keyless Entry, Fear of the Unknown, and Spaghetti Query。 This book will help you and your team find them。 Even better, it will also show you how to fix them, and how to avoid these and other problems in the future。 SQL Antipatterns gives you a rare glimpse into an SQL expert's playbook。 Now you can stamp out these common database errors once and for all。 Whatever platform or programming language you use, whether you're a junior programmer or a Ph。D。, SQL Antipatterns will show you how to design and build databases, how to write better database queries, and how to integrate SQL programming with your application like an expert。 You'll also learn the best and most current technology for full-text search, how to design code that is resistant to SQL injection attacks, and other techniques for success。

Download

Reviews

Tech Nossomy

One of the better books on SQL programming, with clear examples and light touch on the human interest stories。 Some of the points made are outdated as successive releases of the databases mentioned have become more feature-rich。 Also versioning systems and version control is not discussed。

Samuel

I reviewed a newer edition of this book for Pragmatic Programmers。 It was fantastic and covered ever anti-pattern I have committed over the years。 Wish I would have had this book a couple decades ago。

Patryk Woziński

Well structurized book, but in my opinion it’s more for junior developers to cover their knowledge gap, not for seniors that are trying to learn something deeper about SQL language。3 or 4 stars - I am still not sure。 Recommended only to less experienced engineers IMO。

Jeremy Carman

This books is a bit older, but the advice still holds up。 The format was easy to digest and examples easy to understand。 As a software developer I'd wish I had read this book a long time ago。 Over the years, I have been exposed to quite a few of the anti-patterns he laid out。 I've even implemented a few。 I found his reasoning and alternatives insightful。 I also appreciated that almost every anti-pattern he presented he gave concrete exceptions to the rule, along with conversational hints to reco This books is a bit older, but the advice still holds up。 The format was easy to digest and examples easy to understand。 As a software developer I'd wish I had read this book a long time ago。 Over the years, I have been exposed to quite a few of the anti-patterns he laid out。 I've even implemented a few。 I found his reasoning and alternatives insightful。 I also appreciated that almost every anti-pattern he presented he gave concrete exceptions to the rule, along with conversational hints to recognise when someone else was using that anti-pattern。There's only a few small nitpicks I have。 The only one I'll mention here is about some of his proposed solutions。 I'm sure those queries, seem easy to him, but would be a bit hard for me, and very difficult for a junior developer to understand or generate。 。。。more

Adam

Not sure who this would be useful for。 Too specific for people with little experience, but nothing all that new for those who've seen a bunch of data models。 Maybe a software engineer tasked to build a service? (Karwin might have said as much in the book, forgive me if that's the case。)Like with most things data modeling, in the end folks are probably better off reading Kimball。 Not sure who this would be useful for。 Too specific for people with little experience, but nothing all that new for those who've seen a bunch of data models。 Maybe a software engineer tasked to build a service? (Karwin might have said as much in the book, forgive me if that's the case。)Like with most things data modeling, in the end folks are probably better off reading Kimball。 。。。more

Slávek Rydval

Dobře popsaná kniha známých i méně známých antipatternů v SQL (tedy především v návrhu fyzického datového modelu v relačních databázích), jak je odhalit a způsobů, jaké alternativní řešení použít。 Výhodou je, že se autor maximálně snaží, aby text platit pro maximum SQL databází, a tam, kde to nejde, tak zmíní řešení v jednotlivých produktech (MySQL, Oracle, PostgreSQL a MS SQL)。 Dal bych to jako povinnou literaturu studentům jistých vysokých škol, kteří v tom lepším případě kolem sebe házejí nor Dobře popsaná kniha známých i méně známých antipatternů v SQL (tedy především v návrhu fyzického datového modelu v relačních databázích), jak je odhalit a způsobů, jaké alternativní řešení použít。 Výhodou je, že se autor maximálně snaží, aby text platit pro maximum SQL databází, a tam, kde to nejde, tak zmíní řešení v jednotlivých produktech (MySQL, Oracle, PostgreSQL a MS SQL)。 Dal bych to jako povinnou literaturu studentům jistých vysokých škol, kteří v tom lepším případě kolem sebe házejí normální formy, ale databázové schéma prakticky navrhnout neumí。 Stejně tak by se na to mohli podívat programátoři, kteří i dnes dokáží připravit aplikaci pro ideální SQL injection útok。A proč „jen“ tři hvězdičky? Některá témata by si zasloužila větší diskuzi nebo podrobnější rozepsání předvším v oblasti řešení。 。。。more

Dana Larose

A good discussion of database design issues and common mistakes。 Definitely one to keep on my desk when I'm starting a new project or reworking one of my existing ones。Was pleased and smug to see I'd recognized and avoided a bunch of them over the years!As a side benefit, I picked up a few nice SQL tricks I didn't know。 A good discussion of database design issues and common mistakes。 Definitely one to keep on my desk when I'm starting a new project or reworking one of my existing ones。Was pleased and smug to see I'd recognized and avoided a bunch of them over the years!As a side benefit, I picked up a few nice SQL tricks I didn't know。 。。。more

E D

This book cover many antipatterns in Database Design which I think every programmer should acknowledge of。 It's a good book to read! This book cover many antipatterns in Database Design which I think every programmer should acknowledge of。 It's a good book to read! 。。。more

Gordon

Great book on things not to do with databases

John Mantios

F***ing awesome!

Jason

Short and to-the-point chapters, great conversational writing。 Love that every chapter involves a section on when it makes sense to use the antipattern。 Gonna be re-referencing this one for a long time。

Luke Darling

I think this was a great book。 In my career, I am seeing a lot of developers that do not have enough experience with database design/management/patterns。 This book helps to bridge that gap between developers and dbas。

Jesus

En general muy buenos consejos sobre como gestionar bien una base de datos (a nivel de diseñarla, no de administración)。 Quizás un poco repetitivas y obvias algunas cosas, pero se aprenden cosas interesantes

Kiril Kirilov

Really pleasant book。 Of course, it is not anything extraordinary。

Viraj Bhosle

I loved this book and my data engineer friend too。 For intermediate, advance users of database, few chapters will appear to be quite basic。 For beginners, there is a lot to learn from this book。 It explains pros and cons behind every database design trade off, which helps you make wise choices。

Genert

Obligatory reading for every software engineer out there who deal with databases in daily basis。

Javier

If in one way or another you are involved with databases you should read this book。 Developers and DBAs alike would benefit from this read。 It is very well written, great content and easy to follow。 Also, no superfluous content in this one。

Lisa

With many relational database systems available in the market, I find there is not much need to design a RDBMS product to the level this book gives。 Working with data analytics, I found part 3 to be the most useful with Query Antipatterns。 Majority of the issues are addressed with proper training so I can see this book would be good for those who are self learners who may not have many opportunities for formal training。 The book is written in a format that gives the antipattern as an example, th With many relational database systems available in the market, I find there is not much need to design a RDBMS product to the level this book gives。 Working with data analytics, I found part 3 to be the most useful with Query Antipatterns。 Majority of the issues are addressed with proper training so I can see this book would be good for those who are self learners who may not have many opportunities for formal training。 The book is written in a format that gives the antipattern as an example, then provides the best solution。 Decent book overall, but I didn’t get much out of the content or saw examples that shouldn’t happen unless proper practices weren’t followed。 。。。more

Michael Gaudet

I thought this book was ok。 All the “anti patterns” are good to be aware of, but I’d say they vary in likelihood。 Some are mistakes I would expect only a real newbie to make。 Others, like SQL injection, are useful sections that try to dispel myths believed by experienced users even now。My edition was published in 2010, so I shouldn’t be surprised that the non-SQL code examples (such as for dynamic SQL) are in PHP。 I also can’t fault the book’s age for having such a small section on relational ma I thought this book was ok。 All the “anti patterns” are good to be aware of, but I’d say they vary in likelihood。 Some are mistakes I would expect only a real newbie to make。 Others, like SQL injection, are useful sections that try to dispel myths believed by experienced users even now。My edition was published in 2010, so I shouldn’t be surprised that the non-SQL code examples (such as for dynamic SQL) are in PHP。 I also can’t fault the book’s age for having such a small section on relational mappers。All in all, a decent read for a new SQL user, but if you have any experience with SQL you might want to skip this one for a newer reference。 。。。more

Horia

It's a pretty good book on SQL。 It is aimed at people with beginner-medium SQL experience。 Beginners will not really understand what's happening there。 And if you've written the database interface layer for 3-5 apps, it might be partially interesting for you。If you're advanced with SQL, you already know these patterns。 It's a pretty good book on SQL。 It is aimed at people with beginner-medium SQL experience。 Beginners will not really understand what's happening there。 And if you've written the database interface layer for 3-5 apps, it might be partially interesting for you。If you're advanced with SQL, you already know these patterns。 。。。more

Phil Eaton

This enjoyable read covers many anti-patterns, clearly and with compelling reason, that I've both been thrust into and put myself into。 It is the first book I've read on database design and optimization after 5 years of professional software development。 It is a great jumping point for the topic with the numerous other books it cites。 This enjoyable read covers many anti-patterns, clearly and with compelling reason, that I've both been thrust into and put myself into。 It is the first book I've read on database design and optimization after 5 years of professional software development。 It is a great jumping point for the topic with the numerous other books it cites。 。。。more

Majed Daas

كتاب رائع، يجب على كل مبرمج يحتك بقواعد البيانات قراءته بتعمق ، يتميز الكاتب بأنه عبر الأمثلة التي يطرحها يقوم بالتأكيد على القواعد النظرية دون أن يشعر القارئ ، ثم في نهاية الكتاب يضع القواعد النظرية ويربطها بالأمثلة التي وضعها خلال الكتاب 。

Todor

While I enjoyed reading this book, I found most of the example trivial from the RoR best practices and conventions, I would recommend it if you want to level up your sql game。

David

The book was easy to read and well explained。 However, I haven't seen very many of his anti-patterns in practice with actual projects that I've worked on in the past。 Maybe I'm just lucky to work on things that were well built or I'm more experienced than the target audience for the book。 However, I didn't learn too much that I didn't already know。 The book was easy to read and well explained。 However, I haven't seen very many of his anti-patterns in practice with actual projects that I've worked on in the past。 Maybe I'm just lucky to work on things that were well built or I'm more experienced than the target audience for the book。 However, I didn't learn too much that I didn't already know。 。。。more

Matias Fernandez

As someone struggling to design my website's database, this book hit the spot。 I couldn't have imagined all the things I had wrong。 I'm so glad I found this gem。 As someone struggling to design my website's database, this book hit the spot。 I couldn't have imagined all the things I had wrong。 I'm so glad I found this gem。 。。。more

Ispiriants Volodymyr

It's a very good book for the people, who just learned SQL。 I regret that I did not read it before, because it will resolve some of issues during my work。 It's a very good book for the people, who just learned SQL。 I regret that I did not read it before, because it will resolve some of issues during my work。 。。。more

Adi

Well structured and written。 Some chapters felt a bit too obvious, but that is very subjective。 I would recommend it especially to young web developers and all the "rockstar ninjas", who think they do not need to read it。 Well structured and written。 Some chapters felt a bit too obvious, but that is very subjective。 I would recommend it especially to young web developers and all the "rockstar ninjas", who think they do not need to read it。 。。。more

Vasil Todorov

A great book, that is easy to read, and includes many important topics。 I would say it is an intermediate book about databases, so if you are a database expert there won't be much to learn from it。 I didn't like the usage of php inside the book。 Also in the sections "regognizing the antipattern" the given examples did sound a bit stupid。 I still give it 5 stars, the ratio between what's learnt / time spent is really good。 A great book, that is easy to read, and includes many important topics。 I would say it is an intermediate book about databases, so if you are a database expert there won't be much to learn from it。 I didn't like the usage of php inside the book。 Also in the sections "regognizing the antipattern" the given examples did sound a bit stupid。 I still give it 5 stars, the ratio between what's learnt / time spent is really good。 。。。more

Anton Antonov

The book that every modern developer should read。 As we all know, databases are an essential part of software development。 With the rise of NoSQL databases, the relational ones start to get less attention than they deserve, but that all comes right whenever you read about the next big project/company deciding to store their relational data in a non-relational NoSQL solution *cough* *cough* *cough* MongoDB followers *cough* *cough*。And here we are。 You stopped to read this review and possibly rea The book that every modern developer should read。 As we all know, databases are an essential part of software development。 With the rise of NoSQL databases, the relational ones start to get less attention than they deserve, but that all comes right whenever you read about the next big project/company deciding to store their relational data in a non-relational NoSQL solution *cough* *cough* *cough* MongoDB followers *cough* *cough*。And here we are。 You stopped to read this review and possibly read the sample or go straight to read the book。 What you need to know is that this is something worth reading and taking your time。 I, contrary to my 'give it time' advice, did not spend more than a week with this book。 I justify 1 week as enough time to understand the issues since I faced most of them in 3-4 projects that had databases falling in at least 2-3 anti-patterns。A big plus for the reader is the format used throughout the book - chapter intro, objective, anti pattern 1 。。。 anti pattern N, how to identify the anti-pattern based on questions/discussions in your team, valid use of the anti-pattern (if any) and then solution 1 。。。 solution N。 Really, really easy to read format that easily transforms the book into a reference book when you need to confirm an anti-pattern in your project and search for a solution asap。 Good job!What's most important to read and understand thoroughly is the "Logical Database Design Anti-patterns" chapters。 I think this is where people make most of their bad decisions in RDB usage。 The "Polymorphic associations" anti-patterns really resonated with me。 That's something that I've been trying to address a lot in projects and teams I participate in。 Mostly successful, I convince them to keep the cleverness and trickiness out of the DB design and instead keep it simple without relying on polymorphic associations if possible。 Other reviewers said that the "Application development Anti-patterns" section is a hit or miss in regards of content quality and relevance。 I think otherwise。 While it chews on the all-known topics nowadays of - 'readable passwords' and 'sql injections', the 'pseudokey neat-freak' isn't exactly the most popular topic, is it? Chapter 24 "Diplomatic Immunity" is a worth to be part of Robert C。 Martin's "Clean Coder"。 Perfect scenarios that people face in a corporate environment of washed up responsibilities and diplomatic immunity。 Chapter 25 "Magic Beans" is a bit weird。 It starts off as an attack to ActiveRecord without focus and then transforms into something more reasonable。 I just want to warn everyone reading it, to give it a chance and read the whole of it。 I did not like it until I reached the solutions part and it all made sense。 The author definitely could use a different tone and language to get his point across in 25。 Either way, the solutions is mature and introducing an abstraction above the ActiveRecord objects usage in controllers is reasonable。 If you're a Rails/Django developer you might scratch your head a bit where would these lie。 Rails especially has the mysterious controller helpers that no one really understands, but the always-safe-bet is put your services-like logic in。。。 the services folder! Tech choice preferences: I wouldn't really justify the author's decision for picking out MySQL and primally PHP for the book, but these are just my two cents。 The book would shine even brighter in the solutions part if a way better relational database as PostgresSQL and a programming language with "class" (as in style, wit, manners, good intentions) were used。 Either way, this does not affect my scoring。Code(SQL) examples: I'm giving great importance to the code examples quality in every tech book I read。 If you can't follow the examples - the book is only 1/3 as useful as they're selling it to you。 "SQL Antipatterns" does not have any code examples problems。 I was pleasantly surprised to see all the code sections in the book having a code example file path that you can instantly find if you download the source code zip from the site。 That way I could easily translate all the code into PostgresSQL-compliant SQL。 The source code is not hosted on GitHub but nothing is ever perfect。The final verdict is: read this book sooner than you could mess up your database design。 :) 。。。more

Paul Glass-steel

Only complaint: it wasn't long enough。 Only complaint: it wasn't long enough。 。。。more